<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../print.css" type="text/css" media="print">
<meta content="RadioButtonGroup,jp.raohmaru.controls.RadioButtonGroup,name,numRadioButtons,selectedData,selection,addRadioButton,getRadioButtonAt" name="keywords">
<title>jp.raohmaru.controls.RadioButtonGroup</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'RadioButtonGroup - Raohmaru AS3 Framework';
				var baseRef = '../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">Raohmaru AS3 

Framework</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../index-list.html')" href="../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../index.html?jp/raohmaru/controls/RadioButtonGroup.html&amp;jp/raohmaru/controls/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;RadioButtonGroup</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class RadioButtonGroup"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">jp.raohmaru.controls</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class RadioButtonGroup</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">RadioButtonGroup <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../../images/inherit-arrow.gif"> flash.events.EventDispatcher</td>
</tr>
</table>
<p></p>
 La clase RadioButtonGroup define un grupo de controles RadioButton para que actúen como un solo control. Sólo se puede seleccionar un botón de
 opción del mismo grupo.<br>
 Cuando un control RadioButton es seleccionado por el usuario, dispara un evento <code>Event.CHANGE</code>.
 <p></p>
<br>
<span class="label">Example</span>
<br><div class='listing'><pre>
import jp.raohmaru.controls.RadioButton;
import jp.raohmaru.controls.RadioButtonGroup;

var rbg : RadioButtonGroup = new RadioButtonGroup("condimento");
 rbg.addEventListener(Event.CHANGE, groupHandler);

var rb1 : RadioButton = new RadioButton(test1_rb, "Con sal", 1, rbg);
 rb1.addEventListener(Event.SELECT, rbHandler);

var rb2 : RadioButton = new RadioButton(test2_rb, "Con azúcar", 2, rbg);
 rb2.addEventListener(Event.SELECT, rbHandler);

function groupHandler(e : Event) : void
{
 trace(e.target.name, e.target.selectedData);
}

function rbHandler(e : Event) : void
{
 trace(e.target.name, e.target.label, e.target.value);
}
</pre></div> 
 <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#name">name</a> : String<div class="summaryTableDescription">
  Obtiene o define el nombre del objeto RadioButtonGroup.</div>
</td><td class="summaryTableOwnerCol">RadioButtonGroup</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#numRadioButtons">numRadioButtons</a> : int<div class="summaryTableDescription">[read-only]
  Obtiene el número de controles de este grupo.</div>
</td><td class="summaryTableOwnerCol">RadioButtonGroup</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#selectedData">selectedData</a> : Object<div class="summaryTableDescription">
  Obtiene la propiedad <code>value</code> del RadioButton seleccionado.</div>
</td><td class="summaryTableOwnerCol">RadioButtonGroup</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#selection">selection</a> : <a href="../controls/RadioButton.html">RadioButton</a>
<div class="summaryTableDescription">
  Obtiene o define una referencia al control seleccionado en el grupo de RadioButton.</div>
</td><td class="summaryTableOwnerCol">RadioButtonGroup</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#RadioButtonGroup()">RadioButtonGroup</a>(name:String)</div>
<div class="summaryTableDescription">
  Crea una nueva instancia de RadioButtonGroup.</div>
</td><td class="summaryTableOwnerCol">RadioButtonGroup</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addRadioButton()">addRadioButton</a>(radioButton:<a href="RadioButton.html">RadioButton</a>):void</div>
<div class="summaryTableDescription">
  Añade un botón de opción a la matriz interna de botones de opción.</div>
</td><td class="summaryTableOwnerCol">RadioButtonGroup</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getRadioButtonAt()">getRadioButtonAt</a>(index:int):<a href="../controls/RadioButton.html">RadioButton</a>
</div>
<div class="summaryTableDescription">
  Recupera el componente RadioButton en la ubicación de índice especificada.</div>
</td><td class="summaryTableOwnerCol">RadioButtonGroup</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="name"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">name</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>name:String</code>&nbsp;&nbsp;[read-write]<p>
  Obtiene o define el nombre del objeto RadioButtonGroup. 
  </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get name():String</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set name(value:String):void</code>
<br>
</div>
<a name="numRadioButtons"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">numRadioButtons</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>numRadioButtons:int</code>&nbsp;&nbsp;[read-only]<p>
  Obtiene el número de controles de este grupo. 
  </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get numRadioButtons():int</code>
<br>
</div>
<a name="selectedData"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">selectedData</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>selectedData:Object</code>&nbsp;&nbsp;[read-write]<p>
  Obtiene la propiedad <code>value</code> del RadioButton seleccionado. Si no hay seleccionado ningún control, esta propiedad será null. 
  </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get selectedData():Object</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set selectedData(value:Object):void</code>
<br>
</div>
<a name="selection"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">selection</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>selection:<a href="../controls/RadioButton.html">RadioButton</a></code>&nbsp;&nbsp;[read-write]<p>
  Obtiene o define una referencia al control seleccionado en el grupo de RadioButton. La propiedad <code>selected</code> del control seleccionado pasa a ser
  <code>true</code>, y <code>false</code> la del resto de controles del grupo. Es recomendable usar este atributo para seleccionar un RadioButton en lugar
  de RadioButton.selected.
  </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get selection():<a href="../controls/RadioButton.html">RadioButton</a></code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set selection(value:<a href="../controls/RadioButton.html">RadioButton</a>):void</code>
<br>
<br>
<span class="label">Example</span>
<br> <div class='listing'><pre>
 import jp.raohmaru.controls.RadioButton;
 import jp.raohmaru.controls.RadioButtonGroup;
 
 var rbg : RadioButtonGroup = new RadioButtonGroup("noticias");
 
 var rb1 : RadioButton = new RadioButton(si_rb, "Sí", true, rbg); 
 var rb2 : RadioButton = new RadioButton(no_rb, "No", false, rbg);
 
 rbg.selection = rb1;
 </pre></div> 
  <p></p>
</div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="RadioButtonGroup()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">RadioButtonGroup</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function RadioButtonGroup(name:String)</code><p>
  Crea una nueva instancia de RadioButtonGroup. Esta acción se suele realizar automáticamente al crear una instancia de RadioButton.
  </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">name</span>:String</code> &mdash; El nombre del grupo
  </td>
</tr>
</table>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="addRadioButton()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addRadioButton</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function addRadioButton(radioButton:<a href="RadioButton.html">RadioButton</a>):void</code><p>
  Añade un botón de opción a la matriz interna de botones de opción. Este método se invoca automáticamente al crear un control RadioButton.
  </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">radioButton</span>:<a href="RadioButton.html">RadioButton</a></code> &mdash; Instancia RadioButton que se añade al grupo
  </td>
</tr>
</table>
</div>
<a name="getRadioButtonAt()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getRadioButtonAt</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getRadioButtonAt(index:int):<a href="../controls/RadioButton.html">RadioButton</a></code><p>
  Recupera el componente RadioButton en la ubicación de índice especificada.
  </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">index</span>:int</code> &mdash; Índice del componente RadioButton
  </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../controls/RadioButton.html">RadioButton</a></code></td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright">http://www.raohmaru.com</center>
</div>
</body>
</html>
<!--http://www.raohmaru.com-->
